package com.tengfei.main.question.service;


import com.tengfei.common.core.domain.PageQuery;
import com.tengfei.common.core.page.TableDataInfo;
import com.tengfei.main.question.domain.bo.QbQuBo;
import com.tengfei.main.question.domain.bo.QbQuQueryBo;
import com.tengfei.main.question.domain.bo.QbUserBo;
import com.tengfei.main.question.domain.bo.QuestionBankBo;
import com.tengfei.main.question.domain.vo.QbUserVo;
import com.tengfei.main.question.domain.vo.QuestionBankVo;

import java.util.Collection;
import java.util.List;

/**
 * 题库Service接口
 *
 * @author tengfei
 * @date 2022-07-28
 */
public interface IQuestionBankService {

    /**
     * 查询题库
     */
    QuestionBankVo queryById(Long qbId);

    /**
     * 查询题库列表
     */
    TableDataInfo<QuestionBankVo> queryPageList(QuestionBankBo bo, PageQuery pageQuery);

    /**
     * 查询题库列表
     */
    List<QuestionBankVo> queryList(QuestionBankBo bo);

    /**
     * 修改题库
     */
    Boolean insertByBo(QuestionBankBo bo);

    /**
     * 修改题库
     */
    Boolean updateByBo(QuestionBankBo bo);

    /**
     * 校验并批量删除题库信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids);

    Boolean insertBatchQuByBo(List<QbQuBo> bos);

    Boolean deleteBatchQuById(List<QbQuBo> bos);

    TableDataInfo bindQuList(QbQuQueryBo bo, PageQuery pageQuery);

    TableDataInfo unBindQuList(QbQuQueryBo bo, PageQuery pageQuery);

    TableDataInfo<QbUserVo> bindUserList(QbUserBo bo, PageQuery pageQuery);

    TableDataInfo<QbUserVo> unBindUserList(QbUserBo bo, PageQuery pageQuery);

    boolean insertBatchUserByBo(List<QbUserBo> bos);

    boolean deleteBatchUserById(List<QbUserBo> bos);
}
